public class demo6 {
    public static void main(String[] args) {
        Thread t = new Thread(()->{
            for (int i = 0; i < 1000_000; i++) {

            }
        });
        System.out.println(t.getState());

        t.start();

        System.out.println(t.getState());

        try {
            t.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        System.out.println(t.getState());
    }
}
